#include "GameplayView.h"

#include "../../../controller/GameplayController.h"

#include <iostream>
#include <vector>

using namespace Views::Console;

GameplayView::GameplayView(Controllers::GameplayController* controller): controller(controller)
{
}

std::queue<Cards::PlayerCard*> GameplayView::openPickPlayersDialog()
{
	int players_count = 0, i = 1;
	std::cout << "Wpisz liczbe graczy" << std::endl;
	//std::cin >> players_count;
	players_count = 4;
	std::queue<Cards::PlayerCard*> players;

	Cards::PlayersCards players_cards = controller->getPlayersCards();

	for(Cards::PlayersCards::iterator iterator = players_cards.begin(); i <= players_count && iterator != players_cards.end(); ++i, ++iterator)
	{
		std::cout << "Gracz " << i << " - " << (*iterator)->getTitle() << std::endl;
		players.push((*iterator));
	}
	return players;

}

